﻿@model HotelRegistrationSystem.Models.RoomHotelModel

@{
    ViewBag.Title = "CreateRoom";
}

<h2>Create A Room</h2>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

    @Html.HiddenFor(model => model.HotelId)
    <fieldset style="width: 400px">
        <legend>Create a room</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Price)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Price)
            @Html.ValidationMessageFor(model => model.Price)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Desciption)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Desciption)
            @Html.ValidationMessageFor(model => model.Desciption)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.RoomTypeId, "Room type")
        </div>
        <div class="editor-field">
            @Html.DropDownList("RoomTypeId", String.Empty)
            @Html.ValidationMessageFor(model => model.RoomTypeId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BedCount)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BedCount)
            @Html.ValidationMessageFor(model => model.BedCount)
        </div>

        <p>
            <input type="submit" value="Create" class = "button small radius" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back", "ViewRooms", new { hotelId = ViewBag.HotelId }, new { @class = "button small radius"})
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
